package com.itheima.socket.tcp.demo09;

import java.io.*;
import java.net.Socket;

public class ClientDemo09 {

    public static void main(String[] args) throws IOException {

        Socket socket = new Socket("192.168.19.34", 9393);
        OutputStream outputStream = socket.getOutputStream();
        BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream));
        BufferedReader bufferedReader = new BufferedReader(new FileReader("D:\\2019.7.30heima\\1.txt"));
        String line = null;
        while ((line = bufferedReader.readLine()) != null){
            bufferedWriter.write(line);
            bufferedWriter.newLine();
            bufferedWriter.flush();
        }
        bufferedReader.close();
        bufferedWriter.close();
        socket.close();
    }
}
